package com.wyg.blog.model.blog;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @description:
 * @author: WYG
 * @time: 2020/7/2 16:31
 */

public class Message implements Serializable {
    private Integer id;
    private String email;
    private String author;
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date create_time;
    private String avatar;
    private String content;
    private Integer parent_id;
    private boolean state;
    private String reply;
    private String ipAddress;
    private String url;

    public Message() {
    }

    public Message(Integer id, String email, String author, Date create_time, String avatar, String content, Integer parent_id,
                   boolean state, String reply, String ipAddress, String url) {
        this.id = id;
        this.email = email;
        this.author = author;
        this.create_time = create_time;
        this.avatar = avatar;
        this.content = content;
        this.parent_id = parent_id;
        this.state = state;
        this.reply = reply;
        this.ipAddress = ipAddress;
        this.url = url;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getParent_id() {
        return parent_id;
    }

    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id=" + id +
                ", email='" + email + '\'' +
                ", author='" + author + '\'' +
                ", create_time=" + create_time +
                ", avatar='" + avatar + '\'' +
                ", content='" + content + '\'' +
                ", parent_id=" + parent_id +
                ", state=" + state +
                ", reply='" + reply + '\'' +
                ", ipAddress='" + ipAddress + '\'' +
                ", url='" + url + '\'' +
                '}';
    }
}
